using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace ConsoleApplication11.Models.Mapping
{
    public class Answer_DetailMap : EntityTypeConfiguration<Answer_Detail>
    {
        public Answer_DetailMap()
        {
            // Primary Key
            this.HasKey(t => t.AD_ID);

            // Properties
            this.Property(t => t.AD_Number)
                .HasMaxLength(50);

            this.Property(t => t.AD_Content)
                .HasMaxLength(500);

            this.Property(t => t.AD_answerContent)
                .HasMaxLength(500);

            // Table & Column Mappings
            this.ToTable("Answer_Detail");
            this.Property(t => t.AD_ID).HasColumnName("AD_ID");
            this.Property(t => t.EM_ID).HasColumnName("EM_ID");
            this.Property(t => t.AR_ID).HasColumnName("AR_ID");
            this.Property(t => t.AD_Number).HasColumnName("AD_Number");
            this.Property(t => t.AD_Content).HasColumnName("AD_Content");
            this.Property(t => t.AD_answerContent).HasColumnName("AD_answerContent");
            this.Property(t => t.State).HasColumnName("State");
            this.Property(t => t.Score).HasColumnName("Score");
        }
    }
}
